package com.platform.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @Author mymac
 * @Date 2024/8/2 4:23 PM
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum BookSourceEnum {

    /**
     * 预约提货
     */
    book("book","预约提货"),
    /**
     * 柜台预约
     */
    counter_book("counter_book","柜台预约"),
    /**
     * 自助机预约
     */
    self_book("self_book","self_book");


    private final String code;
    private final String desc;

    public static BookSourceEnum getCode(String code) {
        for (BookSourceEnum value : BookSourceEnum.values()) {
            if (StringUtils.equals(value.getCode(), code)) {
                return value;
            }
        }
        return null;
    }
}
